//-----------------------------------------------------------------------
// <copyright file="ConfigurationSectionHandler.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics
{
    using System;
    using System.Xml;
    using System.Configuration;

    /// <summary>
    /// Handles the C# Distilled Diagnostics configuration section group.
    /// </summary>
    internal sealed class ConfigurationSectionHandler : IConfigurationSectionHandler
    {
        #region public object Create(object parent, object configContext, XmlNode section)

        /// <summary>
        /// Creates a configuration section handler to handle the C# Distilled Diagnostics configuration section group.
        /// </summary>
        /// <param name="parent">Parent object.</param>
        /// <param name="configContext">Configuration context object.</param>
        /// <param name="section">Section XML node.</param>
        /// <returns>The created section handler object.</returns>
        public object Create(object parent, object configContext, XmlNode section)
        {
            ProviderConfiguration configuration = new ProviderConfiguration(section);

            return configuration;
        }

        #endregion
    }
}

